#!/bin/bash
# turn on bash's job control
set -m
set -x

cd /var/script/

chmod -R 777 ./

rm -rf ./node_modules
npm install \
&& npm install md5-node node-schedule

# Start the primary process and put it in the background
node ./s1.js &

# Start the helper process
node ./exposure.js

# the my_helper_process might need to know how to wait on the
# primary process to start before it does its work and returns


# now we bring the primary process back into the foreground
# and leave it there
fg %1